<?php

namespace XWAM\Addon\POrgProduct\Controller;

/**
 * ProductController 类
 *
 * @since 1.0 <2015-11-16> SoChishun <14507247@qq.com> Added.
 */
class ProductController extends AddonbaseController {

    public function product_list($type_name = 'GOODS') {
        $urls = array(
            'GOODS' => AddonU('ProductGoods/product_list'),
            'ACCESSORY' => AddonU('ProductAccessory/product_list'),
            'WAREHOUSE' => AddonU('ProductWarehouse/product_list'),
        );
        if (array_key_exists($type_name, $urls)) {
            redirect($urls[$type_name]);
        } else {
            exit('不支持的用户类型[' . $type_name . ']!');
        }
    }
}
